csrutil disable
Discover gists
<?php | |
/* | |
* Paginate Advanced Custom Field repeater | |
*/ | |
if( get_query_var('page') ) { | |
$page = get_query_var( 'page' ); | |
} else { | |
$page = 1; | |
} |
sudo apt update -y | |
sudo apt upgrade -y | |
sudo snap install code --classic | |
sudo apt install curl | |
curl -sL https://deb.nodesource.com/setup_15.x | sudo -E bash - | |
sudo apt-get install -y nodejs | |
sudo apt-get install gcc g++ make |
package main | |
import ( | |
"fmt" | |
"time" | |
) | |
// Suggestions from golang-nuts | |
// http://play.golang.org/p/Ctg3_AQisl |
# This script prepares your machine for computer vision challenges (with NVIDIA). | |
# Tested with Ubuntu 20.04 LTS and NVIDIA GeForce GTX 1070 (Aorus Gaming Box enclosure). | |
# Reddit post: https://www.reddit.com/r/eGPU/comments/io94qq/linux_aorus_gaming_box_for_robotics_and_computer/ | |
# | |
# The script does the following: | |
# * Installs NVIDIA driver | |
# * Installs NVIDIA CUDA Toolkit (`nvcc`) | |
# * Installs NVIDIA CUDA Deep Neural Network library (cuDNN) | |
# * Installs OpenCV with CUDA support (WIP) | |
# * Installs TensorFlow with CUDA support |
package bitly | |
import ( | |
"bytes" | |
"encoding/json" | |
"fmt" | |
"net/http" | |
) | |
const BaseURL = "https://api-ssl.bitly.com/v4" |
{ | |
"queries": [{ | |
"name": "List all owned users", | |
"queryList": [{ | |
"final": true, | |
"query": "MATCH (m:User) WHERE m.owned=TRUE RETURN m" | |
}] | |
}, | |
{ | |
"name": "List all owned computers", |
UEsDBBQAAAAIABNQjFGCf/GfLgAAACwAAAAHAAAAUHJvLmtleTMqdncpCXQOKDAp9woMzEo1MTVOrHAzTjTLME7VNs1LK8owTjQpcU8tcuLlAgBQSwECFAAUAAAACAATUIxRgn/xny4AAAAsAAAABwAAAAAAAAAAAAAAAAAAAAAAUHJvLmtleVBLBQYAAAAAAQABADUAAABTAAAAAAA= |
In this task, you're going to implement a REST API for a interacting with a menu of a restaurant. The menu is given to you as a JSON file which you will parse and perform operations on. The required features will be listed below.
In this restaurant, honesty is extremely promoted. So extreme, that the restaurant declares that differing quality of ingredients are used in their meals. Like that's not enough, it also allows the customers to choose the ingredients of each meal in different qualities. Each ingredient has the following quality levels:
low
: the cheapestmedium
: moderate
Snake is a fun game to make as it doesn't require a lot of code (less than 100 lines with all comments removed). This is a basic implementation of the snake game, but it's missing a few things intentionally and they're left as further exploration for the reader.
- Score
- When the snake eats an apple, the score should increase by one. Use context.fillText() to display the score to the screen
- Mobile and touchscreen support
- Allow the game to be scalled down to a phone size. See https://codepen.io/straker/pen/VazMaL